/**
 * @desc    公共校验类
 *
 * @author    Damen
 * @date    2018-03-18
 *
 * @constructor
 */
function MatchesClass() {
    this.config = {
    };

    /**
     * 校验手机号
     * @param phone
     */
    this.checkPhone = function (phone) {
        if (phone == '') {
            return "请输入手机号";
        }
        var param = /^1[34578]\d{9}$/;
        if (!param.test(phone)) {
            return "手机号不合法，请重新输入";
        }
        return "success";
    };

    this.checkPass = function (pass){
        if (pass == '') {
            return "请输入密码";
        } else if(pass.length<6||pass.length>20){
            return "密码长度错误（6-20位字符）";
        }
        return "success";
    };
}